module union_demo();
    // Packed Union: 可综合
    // 压缩共用体内所有成员都为压缩类型且位宽一致
    typedef union packed {
        logic [7:0] data;
        logic [7:0] addr;
    } pku_t;

    initial begin
        // packed union
        pku_t pku = 8'hAA;
        $display("pku.data: %x", pku.data);
        $display("pku.addr: %x", pku.addr);
    end

endmodule 
